package com.sihan.framework.etm.dto;

import java.io.Serializable;
import javax.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import io.swagger.annotations.ApiModelProperty;


@Data
public class PermissionUpdateDTO implements Serializable {

  private static final long serialVersionUID = 8825168359582703868L;

  @NotNull
  @ApiModelProperty(value = "权限ID")
  private String id;

  @ApiModelProperty(value = "权限名称")
  @Length(min = 1, max = 20)
  private String name;

  @ApiModelProperty(value = "权限标识")
  @Length(min = 1, max = 30)
  private String identify;

  @Length(max = 255)
  @ApiModelProperty(value = "资源类型")
  private String resourceType;

  @ApiModelProperty(value = "图标")
  private String icon;

  @ApiModelProperty(value = "菜单URL")
  private String url;
  
  @ApiModelProperty(value = "静态文件URL")
  private String fileUrl;

  @ApiModelProperty(value = "排序字段")
  private Integer sort;

  @Override
  public String toString() {
    return "权限id[" + id +
            "]、权限名称[" + name +
            "]、权限标识[" + identify +
            "]、资源类型[" + resourceType +
            "]。";
  }
}
